SymmetricDifference Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Computes the symmetric difference of this set with another set. The symmetric difference of two sets is all items that appear in either of the sets, but not both. A new set is created with the symmetric difference of the sets and is returned. This set and the other set are unchanged.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public OrderedSet<T> SymmetricDifference(
	OrderedSet<T> otherSet
)
Visual Basic (Declaration)
Public Function SymmetricDifference ( _
	otherSet As OrderedSet(Of T) _
) As OrderedSet(Of T)
Visual C++
public:
OrderedSet<T>^ SymmetricDifference (
	OrderedSet<T>^ otherSet
)

Parameters

otherSet
OrderedSet<(Of <T>)>
Set to symmetric difference with.

Return Value

The symmetric difference of the two sets.

Remarks

The symmetric difference of two sets is computed in time O(M + N log M), where M is the size of the larger set, and N is the size of the smaller set.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionThis set and otherSet don't use the same method for comparing items.

See Also